import React from "react";
import { BrowserRouter, useRoutes } from "react-router-dom";
import { routes } from "./router/index";
import WhileRouter from "./Hoc/WhileRouter";
function App() {
  const El = () => useRoutes(routes);
  return (
    <BrowserRouter>
    {/* 7.封装高阶组件实现路由守卫，所有页面必须登录才能访问 */}
      <WhileRouter>
        <El></El>
      </WhileRouter>
    </BrowserRouter>
  );
}

export default App;
